import { BaseService, Service, Permission } from '@/cool';

@Service('crm/goods')
export default class extends BaseService {
	@Permission('detail')
	detail(params) {
		return this.request({
			url: '/detail',
			params: {
				...params
			}
		});
	}
	@Permission('setZeroGoods')
	setZeroGoods(params) {
		return this.request({
			url: '/setZeroGoods',
			method: 'POST',
			data: {
				...params
			}
		});
	}
	@Permission('updateGoods')
	updateGoods(params) {
		return this.request({
			url: '/updateGoods',
			method: 'POST',
			data: {
				...params
			}
		});
	}
	@Permission('deleteZeroGoods')
	deleteZeroGoods(params) {
		return this.request({
			url: '/deleteZeroGoods',
			method: 'POST',
			data: {
				...params
			}
		});
	}
	@Permission('checkGoods')
	checkGoods(params) {
		return this.request({
			url: '/checkGoods',
			params: {
				...params
			}
		});
	}
	@Permission('cancelNewPerson')
	cancelNewPerson(params) {
		return this.request({
			url: '/cancelNewPerson',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('bigCouponGoods')
	bigCouponGoods(params) {
		return this.request({
			url: '/bigCouponGoods',
			params: {
				...params
			}
		});
	}
	@Permission('modifyBigCopouponGoods')
	modifyBigCopouponGoods(params) {
		return this.request({
			url: '/modifyBigCopouponGoods',
			method: 'post',
			data: {
				...params
			}
		});
	}

	@Permission('bigCouponClassify')
	bigCouponClassify(params) {
		return this.request({
			url: '/bigCouponClassify',
			params: {
				...params
			}
		});
	}
	@Permission('flashGoodsList')
	flashGoodsList(params) {
		return this.request({
			url: '/flashGoodsList',
			params: {
				...params
			}
		});
	}
	@Permission('cancelFlashGoods')
	cancelFlashGoods(params) {
		return this.request({
			url: '/cancelFlashGoods',
			method: 'post',
			data: {
				...params
			}
		});
	}

	@Permission('modifyFlashGoods')
	modifyFlashGoods(params) {
		return this.request({
			url: '/modifyFlashGoods',
			method: 'post',
			data: {
				...params
			}
		});
	}

	@Permission('addFlashGoodsRecord')
	addFlashGoodsRecord(params) {
		return this.request({
			url: '/addFlashGoodsRecord',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('flashGoodsReceiveList')
	flashGoodsReceiveList(params) {
		return this.request({
			url: '/flashGoodsReceiveList',
			params: {
				...params
			}
		});
	}
	// 时间段
	@Permission('flashTime')
	flashTime(params) {
		return this.request({
			url: '/flashTime',
			params: {
				...params
			}
		});
	}
	@Permission('addFlashTime')
	addFlashTime(params) {
		return this.request({
			url: '/addFlashTime',
			method: 'post',
			data: {
				...params
			}
		});
	}
	@Permission('getPreCommission')
	getPreCommission(params) {
		return this.request({
			url: '/getPreCommission',
			params: {
				...params
			}
		});
	}
	// setAllowanceGoods  设为百万补贴商品
	@Permission('setAllowanceGoods')
	setAllowanceGoods(params) {
		return this.request({
			url: '/setAllowanceGoods',
			method: 'post',
			data: {
				...params
			}
		});
	}
	// allowanceGoodsList 百万补贴商品列表
	@Permission('allowanceGoodsList')
	allowanceGoodsList(params) {
		return this.request({
			url: '/allowanceGoodsList',
			params: {
				...params
			}
		});
	}

	// addDayAllowanceGoodsRecord 添加补贴商品
	@Permission('addDayAllowanceGoodsRecord')
	addDayAllowanceGoodsRecord(params) {
		return this.request({
			url: '/addDayAllowanceGoodsRecord',
			method: 'post',
			data: {
				...params
			}
		});
	}
}
